import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
    /*         Scanner in = new Scanner(System.in);
            float a = in.nextFloat();
            String b = in.next();
            int price = 0;
                if(a > 1.0){
                    price = 20 + (int)Math.ceil(a - 1);
                }else {
                    price = 20;
                }
            if(b.equals("y")){
                price += 5;
            }
            System.out.println(price);
        } */

        /* Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String str1 = in.next();
        String str2 = in.next();
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String tmp = in.next();
            stringBuilder.append(tmp);
        }
        if(str1 == null || str2 == null){
            System.out.println(-1);
        }
        int x = stringBuilder.indexOf(str1);
        int y = stringBuilder.indexOf(str2);
        if(x == -1 || y == -1){
            System.out.println(-1);
        }
        System.out.println(Math.abs(x-y)); */

        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] cost = new int[n];
        for (int i = 0; i < n; i++) {
            cost[i] = scanner.nextInt();
        }


    }
}
